package com.kele.auth.model.dto;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 统一认证请求参数
 * @Author: Kele
 * @CreateDate: 2023/4/22 20:04
 * @Version:
 */
public class AuthParam {
    //用户名
    private String username;

    //域  用于扩展
    private String password;

    //手机号
    private String cellphone;

    //验证码
    private String checkCode;

    //验证码key
    private String checkCodeKey;

    // 认证的类型   password:用户名密码模式类型    sms:短信模式类型 wx:微信类型
    private String authType;

    //附加数据，作为扩展，不同认证类型可拥有不同的附加数据。如认证类型为短信时包含smsKey : sms:3d21042d054548b08477142bbca95cfa; 所有情况下都包含clientId
    private Map<String, Object> payload = new HashMap<>();


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public String getCheckCode() {
        return checkCode;
    }

    public void setCheckCode(String checkCode) {
        this.checkCode = checkCode;
    }

    public String getCheckCodeKey() {
        return checkCodeKey;
    }

    public void setCheckCodeKey(String checkCodeKey) {
        this.checkCodeKey = checkCodeKey;
    }

    public String getAuthType() {
        return authType;
    }

    public void setAuthType(String authType) {
        this.authType = authType;
    }

    public Map<String, Object> getPayload() {
        return payload;
    }

    public void setPayload(Map<String, Object> payload) {
        this.payload = payload;
    }

    @Override
    public String toString() {
        return "AuthParamsDto{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", cellphone='" + cellphone + '\'' +
                ", checkCode='" + checkCode + '\'' +
                ", checkCodeKey='" + checkCodeKey + '\'' +
                ", authType='" + authType + '\'' +
                ", payload=" + payload +
                '}';
    }
}
